package com.sg.elastic.core;

import java.io.IOException;

import org.elasticsearch.search.builder.SearchSourceBuilder;

import com.sg.elastic.core.support.HitConvertor;

/**
 * Created by yanlei on 17/5/23.
 */
public interface ElasticOperations {

    boolean index(String index, String type, String id, String json) throws IOException;

    boolean index(String index, String type, String json) throws IOException;

    <T> T search(String index, String type, SearchSourceBuilder builder, HitConvertor<T> convertor) throws IOException;

}
